public class Demo
{


    public static void test( ) {
//IP:port 需要修改 详情见文档
  string loginUrl = "https://IP:port/openapi/openapi";
        HttpWebResponseUtility httpWebResponseUtility = new HttpWebResponseUtility();
        //json请求示例
        String paramStr="{\"cmd\":\"signin\",\"auth\": {\"devKey\": \"demo12\"},\"params\": {\"userName\": \"demo\",\"password\": \"123\"}}";
        HttpWebResponse response = HttpWebResponseUtility.CreatePostHttpResponse(loginUrl, paramStr, null, null, System.Text.Encoding.UTF8, null);
       string encoding = response.ContentEncoding;
       if (encoding == null || encoding.Length < 1)
       {
           encoding = "UTF-8"; //默认编码
       }
       StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
       reader.ReadToEnd();
       response.Close();
    }
}